<?php

namespace App;

use Illuminate\Database\Eloquent\Model;


class Post extends Model
{
    use \App\Common\Eloquent\Query;

    protected $table = 'posts';

    protected $fillable = [
        'user_id' => 'user_id',
        'title' => 'title',
        'desc' => 'desc',

    ];


    /**
     * 获取拥有此图片的模型
     */
    public function image()
    {
        return $this->morphOne(\App\Model\Image::class, 'imageable');
    }


}
